package ca.etsmtl.log320;
import java.awt.EventQueue;
import javax.swing.UIManager;

/**
 * Code pour l'interface de: http://stackoverflow.com/questions/3409099/building-a-gui-for-a-sudoku-solver-complete-with-ascii-example
 */

public class SudokuRun implements Runnable {

    public void run() {
        SudokuImplementation sudokuImplementation = new Log320SudokuImplementation();

        SudokuView sudokuView = new SudokuView();
        sudokuView.setSudokuImplementation(sudokuImplementation);
        sudokuView.setVisible(true);
    }

    public static void main(String args[]) {
        tryToSetSystemLookAndFeel();
        EventQueue.invokeLater(new SudokuRun());
    }

    private static void tryToSetSystemLookAndFeel() {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (Exception ex) {
            System.out.println("Couldn't set LAF");
        }
    }
}